package cn.datawin.cmppclient.sender.entity;

import org.apache.commons.lang3.StringUtils;

/**
 * 通道状态
 */
public enum ProviderStatus {
    START, STOP, HOLD;
    private String value;

    private ProviderStatus() {
        this.value = this.name().toLowerCase();
    }

    private ProviderStatus(String value) {
        this.value = value.toLowerCase();
    }

    @Override
    public String toString() {
        return value;
    }

    public boolean equals(String value) {
        if (StringUtils.isEmpty(value)) {
            return false;
        }
        return this.value.equalsIgnoreCase(value);
    }
}
